import React, { Component } from 'react'
import MouseCat from './Mouse-Cat'

export default class Cat2 extends Component {
  render () {
    // return (
    //   <MouseCat
    //     render={position => {
    //       return (
    //         <div>
    //           <img
    //             style={{
    //               width: 100,
    //               height: 100,
    //               position: 'absolute',
    //               left: position.x,
    //               top: position.y
    //             }}
    //             src='https://img0.baidu.com/it/u=2183740624,1571951038&fm=253&fmt=auto&app=138&f=JPEG?w=705&h=500'
    //           />
    //         </div>
    //       )
    //     }}
    //   />
    // )
    return (
      <MouseCat>
        {position => {
          return (
            <div>
              <img
                style={{
                  width: 100,
                  height: 100,
                  position: 'absolute',
                  left: position.x,
                  top: position.y
                }}
                src='https://img0.baidu.com/it/u=2183740624,1571951038&fm=253&fmt=auto&app=138&f=JPEG?w=705&h=500'
              />
            </div>
          )
        }}
      </MouseCat>
    )
  }
}
